import JSEncrypt from 'jsencrypt';
import moment from "moment";
moment.locale("zh-cn");
// 2.增加公共方法，加密函数
/**
*
* @param value
* @returns {boolean}
*/
export function encodeIdMessage() {
    let encrypt = new JSEncrypt();
    encrypt.setPublicKey(localStorage.getItem("publicKey"));
    let _content = JSON.stringify({date: moment().valueOf(), ip: localStorage.getItem("Ioooop")});
    return encrypt.encrypt(_content);
}